<template>
  <div>
    <!-- 选择喜欢的 -->
    <label v-for="(item,index) in arr" :key="index"><input type="checkbox" :value="item" v-model="newarr">{{item}}</label>
    <br>
    <br>
    <br>
    <div>
      您喜欢的：<span v-for="(item,index) in newarr" :key="index">{{item}}&nbsp;&nbsp;&nbsp;&nbsp;</span>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return {
      arr:["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      newarr:[]
    }
  }
}
</script>

<style>

</style>